package br.com.vertigo.sgci.util;

import java.util.Comparator;

import org.jboss.seam.annotations.Name;

import br.com.vertigo.sgci.entity.Itemrdv;

@SuppressWarnings("unchecked")
@Name("rdvitemIdComparator")
public class RdvItemIdComparator implements Comparator
{
    public int compare(Object o1, Object o2) {
         long id1 = ((Itemrdv)o1).getIdItemrdv();
         long id2 = ((Itemrdv)o2).getIdItemrdv();
         if (id1 < id2) return -1;
         if (id2 < id1) return  1;
         return 0;
    }
}